package com.qf.health.service.Impl;


import com.qf.health.entity.User;
import com.qf.health.mapper.UserMapper;
import com.qf.health.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

/*2021/10/6*/public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public User login(String adminName, String password) {

            User user =null;
            user = userMapper.selectAdmin(adminName);
            if(password.equals(user.getPassword())){
                return user;
            }
        return null;
    }

    @Override
    public Integer updatePassword(User user) {
       Integer result=0;

            result= userMapper.updatePassword(user);

        return result;
    }
}
